package com.bsbm.utils;

import com.bsbm.common.domain.Address;
import com.bsbm.profile.bo.ProfileBO;
import com.bsbm.profile.domain.Profile;
import com.bsbm.profile.domain.ProfileTypeEnum;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * User: SABIR IQBAL
 * Date: 12/31/13
 * Time: 2:14 AM
 * To change this template use File | Settings | File Templates.
 */
public class AppTest {

    private static ApplicationContext appContext = new ClassPathXmlApplicationContext("META-INF/spring/config/spring-bean-locations.xml");

    public static void main(String [] args){
        Profile profile = new Profile();
        profile.setCreatedBy("ProfileBOImplTest");
        profile.setCreatedOn(new Date());
        profile.setFirstName("First Name");
        profile.setLastName("Last Name");
        profile.setMiddleName("Middle Name");
        profile.setProfileType(ProfileTypeEnum.administrator);
        profile.setUpdatedOn(null);
        Address address = new Address();
        address.setAddressLine1("Java Code");
        address.setAddressLine2("Junit code");
        //address.setCity("Kolkata");
        //address.setCountry("India");
        //address.setState("West Bengal");
        address.setZip("700084");
        profile.setAddress(address);

        ProfileBO profileBO = (ProfileBO) appContext.getBean("profileBOProxy");
        //profileBO.save(profile);

    }

}
